<div class="main-content">
    <div class="container-fluid">
        <div class="row">
            <div class="col-12">
                <div class="card">
                    <form class="card-header border-bottom row form-inline">
                        <h4 class="card-title col-lg-2 col-md-6 col-xs-12">用户</h4>
                        <div class="col-lg-10 col-md-6 col-xs-12">
                            <label class="sr-only" for="usename">用户名</label>
                            <input type="text" class="form-control mb-2 mr-sm-2" id="usename" placeholder="用户名">
                            <button type="submit" class="btn btn-primary mb-2">查询</button>
                            <button type="button" class="btn btn-common mb-2">添加</button>
                        </div>
                    </form>
                    <div class="card-body">
                        <div class="table-responsive">
                            <table class="table table-bordered mb-0">
                                <thead>
                                <tr>
                                    <th>#</th>
                                    <th>用户名</th>
                                    <th>创建日期</th>
                                    <th>角色</th>
                                    <th>状态</th>
                                    <th>编辑</th>
                                </tr>
                                </thead>
                                <tbody>
                                <?php
                                $num = count($users);
                                for ($l=0; $l<$num; $l++) {?>
                                    <tr>
                                        <th scope="row"><?php echo $l+1; ?></th>
                                        <td><?php echo $users[$l]["username"]; ?></td>
                                        <td><?php echo $users[$l]["create_time"]; ?></td>
                                        <td><?php echo $users[$l]["role"]; ?></td>
                                        <td>
                                            <?php
                                            switch ($users[$l]["status"]){
                                                case 0:
                                                    ?>
                                                    <span class="badge badge-success">正常</span>
                                                    <?php
                                                    break;
                                                case 1:
                                                    ?>
                                                    <span class="badge badge-warning">审批中</span>
                                                    <?php
                                                    break;
                                                case 2:
                                                    ?>
                                                    <span class="badge badge-info">异常</span>
                                                    <?php
                                                    break;
                                                default:
                                                    ?>
                                                    <span class="badge badge-danger">异常</span>
                                                <?php
                                            }
                                            ?>
                                        </td>
                                        <td>
                                            <a class="badge badge-warning" href="" >编辑</a>
                                            <a class="badge badge-warning" href="" >删除</a>
                                        </td>
                                    </tr>
                                <?php } ?>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>